package com.zretc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("ts") //@RequestMapping("ts") 放在类前
public class TestController {
	
	@GetMapping("test01")
	public String test01()
	{
		return "test01";
	}
	
	@PostMapping("test02")
	public String test02()
	{
		return "test02";
	}
	
	//@java.lang.annotation.Target(value={java.lang.annotation.ElementType.METHOD,java.lang.annotation.ElementType.TYPE})
	@RequestMapping("test03")
	public String test03()
	{
		return "test03";
	}
	
	
	@RequestMapping("test04")
	@ResponseBody //响应体形式返回
	//@java.lang.annotation.Target(value={java.lang.annotation.ElementType.TYPE,java.lang.annotation.ElementType.METHOD})
	public String test04()
	{
		return "test04";
	}

}
